package com.ruoyi.system.course.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.course.mapper.ServiceCoursePayRecordsMapper;
import com.ruoyi.system.course.domain.ServiceCoursePayRecords;
import com.ruoyi.system.course.service.IServiceCoursePayRecordsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 课程信息购买记录Service业务层处理
 * 
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceCoursePayRecordsServiceImpl implements IServiceCoursePayRecordsService 
{
    @Autowired
    private ServiceCoursePayRecordsMapper serviceCoursePayRecordsMapper;

    /**
     * 查询课程信息购买记录
     * 
     * @param id 课程信息购买记录ID
     * @return 课程信息购买记录
     */
    @Override
    public ServiceCoursePayRecords selectServiceCoursePayRecordsById(Long id)
    {
        return serviceCoursePayRecordsMapper.selectServiceCoursePayRecordsById(id);
    }

    /**
     * 查询课程信息购买记录列表
     * 
     * @param serviceCoursePayRecords 课程信息购买记录
     * @return 课程信息购买记录
     */
    @Override
    public List<ServiceCoursePayRecords> selectServiceCoursePayRecordsList(ServiceCoursePayRecords serviceCoursePayRecords)
    {
        return serviceCoursePayRecordsMapper.selectServiceCoursePayRecordsList(serviceCoursePayRecords);
    }

    /**
     * 新增课程信息购买记录
     * 
     * @param serviceCoursePayRecords 课程信息购买记录
     * @return 结果
     */
    @Override
    public int insertServiceCoursePayRecords(ServiceCoursePayRecords serviceCoursePayRecords)
    {
        return serviceCoursePayRecordsMapper.insertServiceCoursePayRecords(serviceCoursePayRecords);
    }

    /**
     * 修改课程信息购买记录
     * 
     * @param serviceCoursePayRecords 课程信息购买记录
     * @return 结果
     */
    @Override
    public int updateServiceCoursePayRecords(ServiceCoursePayRecords serviceCoursePayRecords)
    {
        return serviceCoursePayRecordsMapper.updateServiceCoursePayRecords(serviceCoursePayRecords);
    }

    /**
     * 删除课程信息购买记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceCoursePayRecordsByIds(String ids)
    {
        return serviceCoursePayRecordsMapper.deleteServiceCoursePayRecordsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程信息购买记录信息
     * 
     * @param id 课程信息购买记录ID
     * @return 结果
     */
    @Override
    public int deleteServiceCoursePayRecordsById(Long id)
    {
        return serviceCoursePayRecordsMapper.deleteServiceCoursePayRecordsById(id);
    }
}
